package com.moji.controller.api;


import com.moji.common.base.ApiResult;
import com.moji.entity.MjWorkOrderDetail;
import com.moji.entity.dto.ReplyWorkDto;
import com.moji.service.MjWorkOrderDetailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 电子工单明细表 前端控制器
 * </p>
 *
 * @author ccl
 * @since 2024-08-20
 */
@RestController
@RequestMapping("web/auth/mjWorkOrderDetail")
@Api(tags = "电子工单内容回复相关web接口(控制中心)", value = "电子工单内容回复相关web接口(控制中心)")
public class MjWorkOrderDetailController {

    @Resource
    private MjWorkOrderDetailService mjWorkOrderDetailService;

    @PostMapping("/add")
    @ApiOperation(value = "回复内容_新增",response = Boolean.class)
    public ApiResult add(@Validated @RequestBody ReplyWorkDto replyWorkDto){
        return ApiResult.ok(mjWorkOrderDetailService.add(replyWorkDto));
    }
}

